<link rel="import" href="../../bower_components/polymer/polymer-element.html">

<dom-module id="computed-demo">
  <template>
    <style>
      :host{
        display: block;
      }
    </style>
    <div>[[fullName]]</div>
  </template>

  <script>
    /**
     * @ObserverDemo
     * @polymer
     */
    class ComputedDemo extends Polymer.Element {
      static get is() { return 'computed-demo'; }
      static get properties(){
        return {
          firstName:{
            type: String,
            value:"zhong"
          },
          lastName:{
            type: String,
            value:"zhong"
          },
          fullName:{
              type: String,
              computed:'computedFullName(firstName, lastName)'
          }
        }
      }
      computedFullName(first, lastName){
        return first + " " +lastName;
      }
    }
    window.customElements.define(ComputedDemo.is, ComputedDemo);

  </script>
</dom-module>


